package com.czxy.demo14;

public class Test01 {

    public static void main(String[] args) {


        int s = getCharNum('s');
        System.out.println(s);
    }
    public static int getCharNum(char c){
        String s="this is a test of java";
        int count=0;
        char[] chars = s.toCharArray();
        for (char aChar : chars) {
            if (aChar==c){
                count++;
            }
        }
        String[] s1 = s.split(" ");
        System.out.println(s1[3]);

        String replace = s.replace("java", "JAVASE");
        System.out.println(replace);
        return count;
    }

}
